# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-importlib-metadata
_pkgname=importlib_metadata
pkgver=2.1.1
pkgrel=4
pkgdesc='Read metadata from Python packages.'
url='https://pypi.org/project/importlib-metadata/#files'
arch=('any')
license=('Apache')
depends=('python2' 'python2-contextlib2' 'python2-pathlib2' 'python2-zipp'
         'python2-configparser')
makedepends=('python2-setuptools' 'python2-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('7daf8e829e99a8ed93f5226708e04f712ba8cdaed444b488ea2dcc7940e7bdd0071997c265702403b2c8eb2d96eb4c7bf42ee7b4593127ffa737d1ab9357068f')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

